package com.nstar.model.orderexpress;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="item_spec"
 *     
*/
public class ItemSpec implements Serializable {

    /** identifier field */
    private String itemSpecId;

    /** nullable persistent field */
    private String name;

    /** nullable persistent field */
    private String itemDesc;

    /** nullable persistent field */
    private String defaultValue;

    /** nullable persistent field */
    private String nullable;

    /** nullable persistent field */
    private Date createDate;

    /** persistent field */
    private com.nstar.model.orderexpress.ItemSpecType itemSpecType;

    /** persistent field */
    private Set orderInfoExps;

    /** full constructor */
    public ItemSpec(String itemSpecId, String name, String itemDesc, String defaultValue, String nullable, Date createDate, com.nstar.model.orderexpress.ItemSpecType itemSpecType, Set orderInfoExps) {
        this.itemSpecId = itemSpecId;
        this.name = name;
        this.itemDesc = itemDesc;
        this.defaultValue = defaultValue;
        this.nullable = nullable;
        this.createDate = createDate;
        this.itemSpecType = itemSpecType;
        this.orderInfoExps = orderInfoExps;
    }

    /** default constructor */
    public ItemSpec() {
    }

    /** minimal constructor */
    public ItemSpec(String itemSpecId, com.nstar.model.orderexpress.ItemSpecType itemSpecType, Set orderInfoExps) {
        this.itemSpecId = itemSpecId;
        this.itemSpecType = itemSpecType;
        this.orderInfoExps = orderInfoExps;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="ITEM_SPEC_ID"
     *         
     */
    public String getItemSpecId() {
        return this.itemSpecId;
    }

    public void setItemSpecId(String itemSpecId) {
        this.itemSpecId = itemSpecId;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="30"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="ITEM_DESC"
     *             length="100"
     *         
     */
    public String getItemDesc() {
        return this.itemDesc;
    }

    public void setItemDesc(String itemDesc) {
        this.itemDesc = itemDesc;
    }

    /** 
     *            @hibernate.property
     *             column="DEFAULT_VALUE"
     *             length="100"
     *         
     */
    public String getDefaultValue() {
        return this.defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    /** 
     *            @hibernate.property
     *             column="NULLABLE"
     *             length="1"
     *         
     */
    public String getNullable() {
        return this.nullable;
    }

    public void setNullable(String nullable) {
        this.nullable = nullable;
    }

    /** 
     *            @hibernate.property
     *             column="CREATE_DATE"
     *             length="19"
     *         
     */
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /** 
     *            @hibernate.many-to-one
     *             not-null="true"
     *            @hibernate.column name="ITEM_SPEC_TYPE_"         
     *         
     */
    public com.nstar.model.orderexpress.ItemSpecType getItemSpecType() {
        return this.itemSpecType;
    }

    public void setItemSpecType(com.nstar.model.orderexpress.ItemSpecType itemSpecType) {
        this.itemSpecType = itemSpecType;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="ITEM_SPEC_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.OrderInfoExp"
     *         
     */
    public Set getOrderInfoExps() {
        return this.orderInfoExps;
    }

    public void setOrderInfoExps(Set orderInfoExps) {
        this.orderInfoExps = orderInfoExps;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("itemSpecId", getItemSpecId())
            .toString();
    }

}
